<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:th="http://www.thymeleaf.org">

<head>
    <th:block th:include="common/common_head :: commonHeader('订单详情')"/>
</head>

<body class="gray-bg">
<input id="currUserId" type="hidden">
<div class="wrapper wrapper-content animated fadeInRight">
    <form class="form-horizontal" method="post" id="orderForm">
        <div class="row">
            <div class="col-sm-22">
                <div class="ibox float-e-margins">
                    <div class="ibox-title">
                        <h5>雇主信息</h5>
                    </div>
                    <div class="ibox-content">
                        <input type="hidden" id="id" th:value="${id}">
                        <div class="form-group">
                            <input type="hidden" id="employerMainId">
                            <label class="col-sm-2 control-label"><span class="required-sign">*</span>联系电话：</label>
                            <div class="col-sm-3">
                                <input id="employerMobile" name="employerMobile" onchange="getEmployerInfo()"
                                       type="text" placeholder="联系电话"
                                       class="form-control">
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">雇主姓名：</label>
                            <div class="col-sm-3">
                                <input id="employerName" name="employerName" type="text" placeholder="雇主姓名" readonly
                                       class="form-control">
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label"><span class="required-sign">*</span>服务地址：</label>
                            <div class="col-sm-3">
                                <select class="form-control m-b" id="provinceCode" name="provinceCode" readonly>
                                    <option value=''>请选择省份</option>
                                </select>
                            </div>
                            <div class="col-sm-3">
                                <select class="form-control m-b" id="cityCode" name="cityCode" readonly>
                                    <option value=''>请选择城市</option>
                                </select>
                            </div>
                            <div class="col-sm-3">
                                <select class="form-control m-b" id="areaCode" name="areaCode" readonly>
                                    <option value=''>请选择区县</option>
                                </select>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label"><span class="required-sign">*</span>详细地址：</label>
                            <div class="col-sm-6">
                                <input id="address" name="address" type="text" placeholder="详细地址" readonly
                                       class="form-control">
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label"><span class="required-sign">*</span>订单来源：</label>
                            <div class="col-sm-3">
                                <select class="form-control m-b" id="sourceId" name="sourceId" readonly>
                                    <option value=''>请选择来源</option>
                                    <option value='1'>老客户</option>
                                    <option value='2'>本店订单</option>
                                    <option value='3'>58订单</option>
                                    <option value='4'>外接订单</option>
                                </select>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>

        <div class="row">
            <div class="col-sm-22">
                <div class="ibox float-e-margins">
                    <div class="ibox-title">
                        <h5>服务信息</h5>
                    </div>
                    <div class="ibox-content">
                        <div class="form-group">
                            <label class="col-sm-2 control-label"><span class="required-sign">*</span>服务商品：</label>
                            <div class="col-sm-3">
                                <select class="form-control m-b" id="prodId" name="prodId" onchange="changePrice()"
                                        readonly>
                                </select>
                            </div>
                        </div>
                        <div class="form-group" id="startTimeDiv">
                            <label class="col-sm-2 control-label"><span class="required-sign">*</span>用工时间：</label>
                            <div class="col-sm-3">
                                <input id="startTime" name="startTime" type="text" placeholder="用工时间"
                                       class="form-control laydate-icon" readonly>
                            </div>
                        </div>
                        <input id="bottomPrice" type="hidden">
                        <div class="form-group" id="value1Div" style="display: none">
                            <label class="col-sm-2 control-label">厨房：</label>
                            <div class="col-sm-3">
                                <input id="value1" name="value1" type="text" placeholder="厨房数" readonly
                                       class="form-control" oninput="changeServicePrice()">
                            </div>
                            <div class="col-sm-2" style="text-align: left">
                                <span class="unit">间</span>
                            </div>
                        </div>
                        <div class="form-group" id="value2Div" style="display: none">
                            <label class="col-sm-2 control-label">卫生间：</label>
                            <div class="col-sm-3">
                                <input id="value2" name="value2" type="text" placeholder="卫生间数" readonly
                                       class="form-control" oninput="changeServicePrice()">
                            </div>
                            <div class="col-sm-2" style="text-align: left">
                                <span class="unit">间</span>
                            </div>
                        </div>

                        <div class="form-group">
                            <label class="col-sm-2 control-label"><span class="required-sign">*</span>服务费用：</label>
                            <div class="col-sm-3">
                                <input id="servicePrice" name="servicePrice" type="text" placeholder="服务费用" readonly
                                       class="form-control">
                            </div>
                            <div class="col-sm-2" style="text-align: left">
                                <span class="unit">元</span>
                            </div>
                        </div>

                        <div class="form-group">
                            <label class="col-sm-2 control-label">其他要求：</label>
                            <div class="col-sm-4">
                                <textarea id="otherDemand" name="otherDemand" class="form-control"
                                          onkeyup='textAreaChange(this,200)' onkeydown='textAreaChange(this,200)'
                                          rows='5' readonly></textarea>
                                <div class='text-right'>
                                    <em style='color:red'>0</em>/<span>200</span>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <!--<div class="row">-->
        <!--<div class="col-sm-22" style="text-align: center">-->
        <!--<input class="btn btn-primary" type="button" onclick="save(false)" value="保存" style="margin-right: 20px">-->

        <!--<input th:if="${id == null || id == ''}" class="btn btn-primary" type="button" onclick="save(true)" value="保存并处理" style="margin-right: 20px">-->

        <!--<button th:if="${id != null && id != ''}" class="btn btn-primary" type="button" onclick="Dialog.closeFrame(window.name)">取 消</button>-->
        <!--</div>-->
        <!--</div>-->
    </form>
</div>

<!--引入公共js-->
<div th:include="common/onload_js :: onloadJS"></div>
<!-- Chosen -->
<script th:src="@{/static/js/plugins/chosen/chosen.jquery.js}"></script>
<script th:src="@{/static/js/custom/utils.js}"></script>
<script th:src="@{/static/js/custom/cleanupOrder.js}"></script>
<script th:src="@{/static/js/custom/textareaNum.js}"></script>

<script type="text/javascript">
    $(document).ready(function () {
        var id = $("#id").val();
        if (id != "" && id != null) {//编辑
            initOrder(id);
        }
    });
</script>
</body>
</html>
